classDiagram
    class Handler {
        <<interface>>
        +setNextHandler(next: Handler): void
        +handleRequest(request: Request): void
    }
    class ConcreteHandlerA {
        -next: Handler
        +setNextHandler(next: Handler): void
        +handleRequest(request: Request): void
    }
    class ConcreteHandlerB {
        -next: Handler
        +setNextHandler(next: Handler): void
        +handleRequest(request: Request): void
    }
    class Request {
    }
    class Client {
    }

    Handler <|.. ConcreteHandlerA
    Handler <|.. ConcreteHandlerB
    ConcreteHandlerA o-- ConcreteHandlerB : next
    Client --> Handler : creates
